.class final Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;
.super Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/c;


# direct methods
.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;ILcom/wqmobile/sdk/pojoxml/core/PojoXmlInitInfo;)V
    .locals 0

    invoke-direct {p0, p1, p2, p3, p4}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/c;-><init>(Ljava/lang/String;Ljava/lang/String;ILcom/wqmobile/sdk/pojoxml/core/PojoXmlInitInfo;)V

    return-void
.end method


# virtual methods
.method public final process(Ljava/lang/Object;)Ljava/lang/String;
    .locals 11

    const/4 v10, 0x1

    const/4 v9, 0x0

    invoke-virtual {p0}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->getElementName()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, p1, v0}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->isEmptyElement(Ljava/lang/Object;Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-virtual {p0}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->getXmlContent()Ljava/lang/String;

    move-result-object v0

    :goto_0
    return-object v0

    :cond_0
    invoke-static {p1}, Lcom/wqmobile/sdk/pojoxml/util/ClassUtil;->getArrayLength(Ljava/lang/Object;)I

    move-result v0

    if-nez v0, :cond_1

    invoke-virtual {p0}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->getElementName()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->getAttributes()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p0}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->getSpace()I

    move-result v2

    invoke-virtual {p0, v0, v1, v2}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->createEmptyElementWithNL(Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v0

    goto :goto_0

    :cond_1
    invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v1

    invoke-static {v1}, Lcom/wqmobile/sdk/pojoxml/util/ClassUtil;->isPrimitiveOrWrapper(Ljava/lang/Class;)Z

    move-result v1

    move v2, v9

    :goto_1
    if-lt v2, v0, :cond_2

    invoke-virtual {p0}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->getXmlContent()Ljava/lang/String;

    move-result-object v0

    goto :goto_0

    :cond_2
    invoke-static {p1, v2}, Ljava/lang/reflect/Array;->get(Ljava/lang/Object;I)Ljava/lang/Object;

    move-result-object v3

    invoke-static {v3}, Lcom/wqmobile/sdk/pojoxml/util/ClassUtil;->isWrapperArray(Ljava/lang/Object;)Z

    move-result v4

    invoke-static {v3}, Lcom/wqmobile/sdk/pojoxml/util/ClassUtil;->isCollectionArray(Ljava/lang/Object;)Z

    move-result v5

    invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    if-eqz v3, :cond_5

    move v6, v9

    :goto_2
    if-nez v6, :cond_4

    if-nez v1, :cond_3

    if-eqz v4, :cond_8

    :cond_3
    invoke-virtual {p0}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->isCdataEnabled()Z

    move-result v4

    invoke-static {v3, v4}, Lcom/wqmobile/sdk/pojoxml/util/StringUtil;->getActualValue(Ljava/lang/Object;Z)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {p0}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->getElementName()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {p0}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->getAttributes()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {p0}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->getSpace()I

    move-result v6

    invoke-virtual {p0, v4, v5, v3, v6}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->getElementWithNL(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {p0, v3}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->writeXmlContent(Ljava/lang/String;)V

    :cond_4
    :goto_3
    add-int/lit8 v2, v2, 0x1

    goto :goto_1

    :cond_5
    if-nez v1, :cond_6

    if-eqz v4, :cond_7

    :cond_6
    invoke-virtual {p0}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->getElementName()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {p0}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->getAttributes()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {p0}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->getSpace()I

    move-result v8

    invoke-virtual {p0, v6, v7, v8}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->createEmptyElementWithNL(Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {p0, v6}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->writeXmlContent(Ljava/lang/String;)V

    move v6, v10

    goto :goto_2

    :cond_7
    invoke-virtual {p0}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->getElementName()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {p0}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->getAttributes()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {p0}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->getSpace()I

    move-result v8

    invoke-virtual {p0, v6, v7, v8}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->createEmptyElementWithNL(Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {p0, v6}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->writeXmlContent(Ljava/lang/String;)V

    move v6, v10

    goto :goto_2

    :cond_8
    if-eqz v5, :cond_9

    invoke-virtual {p0}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->getElementName()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {p0}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->getAttributes()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {p0}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->getSpace()I

    move-result v6

    invoke-virtual {p0, v4, v5, v6}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->getStartTagWithNL(Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {p0, v4}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->writeXmlContent(Ljava/lang/String;)V

    invoke-virtual {p0}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->incrementSpace()V

    invoke-virtual {p0, v3}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->processCollection(Ljava/lang/Object;)V

    invoke-virtual {p0}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->decrementSpace()V

    invoke-virtual {p0}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->getElementName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {p0}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->getSpace()I

    move-result v4

    invoke-virtual {p0, v3, v4}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->getCloseTagWithNL(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {p0, v3}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->writeXmlContent(Ljava/lang/String;)V

    goto :goto_3

    :cond_9
    invoke-virtual {p0}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->getElementName()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {p0, v3, v4}, Lcom/wqmobile/sdk/pojoxml/core/processor/pojotoxml/a;->processObject(Ljava/lang/Object;Ljava/lang/String;)V

    goto :goto_3
.end method
